#!/bin/bash
#********************************************************************
#Author: Andy
#Date： 2021-12-14
#FileName： centos7-init.sh
#URL： 
#Description： CentOS7系统初始化脚本
#********************************************************************

echo -e "开始更新系统版本......"
yum update -y

echo -e "正在安装常用工具......"
yum install -y vim* unzip wget git net-tools yum-utils telnet xinetd libssl-dev

echo -e "正在关闭防火墙........"
systemctl stop firewalld
systemctl disable firewalld.service
firewall-cmd --state

echo -e "\033[41;37mCentOS7初始化完成.....\033[0m"

echo -e "本机信息如下.........."
echo -e "主机名："`hostname`
echo -e "IP地址："`ifconfig | grep broadcast | awk "NR==1" | awk -F" " '{print $2}'`
exit 0
